package com.a16.yuejian.yuejian.service;

import com.a16.yuejian.yuejian.javabean.Activity;
import com.a16.yuejian.yuejian.javabean.Collected;
import com.a16.yuejian.yuejian.javabean.Order;
import com.a16.yuejian.yuejian.javabean.Success;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * Created by 55080 on 2017/9/30.
 */

public interface ActivityService {
    @GET("index.php/api/Activity/allactivity")
    Call<List<Activity>> allactivity();

    @GET("index.php/api/Activity/getactivity")
    Call<Activity> getactivity(
            @Query("activityid")String ac_id
    );

    @GET("index.php/api/index/follow")
    Call<Success> follow(
            @Query("id")String id,
            @Query("uid")String uid,
            @Query("type")String type
    );

    @GET("index.php/api/index/isCollected")
    Call<Collected> isCollected(
            @Query("id")String id,
            @Query("uid")String uid,
            @Query("type")String type
    );

    @GET("index.php/api/Activity/buy")
    Call<Success> buy(
            @Query("ordername")String ordername,
            @Query("price")String price,
            @Query("num")String num,
            @Query("userid")String userid
    );

    @GET("index.php/api/Activity/getOrder")
    Call<Order> getOrder(
            @Query("userid")String userid,
            @Query("ordernum")String ordernum
    );
}
